package router

import (
	"cgs-server/server"
	"cgs-server/server/cgs/app/api"
	"cgs-server/server/cgs/app/store/mongo"
)

func initMarketRouter() {
	storeIns, _ := mongo.GetMongoFactory()

	handler := api.NewMarketHandler(storeIns)

	server.Get("/api/app/market/get", handler.Get, "", server.None)
	server.Post("/api/app/market/delete", handler.Delete, "", server.Login)
	server.Post("/api/app/market/save", handler.Save, "", server.Login)
	server.Post("/api/app/market/update", handler.Update, "", server.Login)
	server.Get("/api/app/market/list", handler.List, "", server.None)
}
